<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Book List</title>
</head>
<style type="text/css">
	p>img {
		height: 100px;
	}
</style>
<body>

	<p style="text-align: right;">Current user: ${ customer.cname }</p>

	<c:forEach items="${ books }" var="b">
		<div style="float: left; margin-right: 10px; text-align: center; border: 1px solid #000; padding: 10px;">
			<form action="cart/add.action" method="post">
				<input type="hidden" name="bookId" value="${ b.id }"/>
				<p>${ b.bname }</p>
				<p><img src="${ b.imgPath }" /></p>
				<p><input type="submit" value="Add to cart"/></p>
			</form>
		</div>
	</c:forEach>

</body>
</html>